package bam.action.datarecordAPP;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import net.sf.json.JSONObject;
import bam.actionoper.UserCase;
import bam.service.DealInfoService;
import bam.service.UserService;
import bam.service.UserinfoService;

public class UserCaseAction {
private DealInfoService dealInfoService;
private int userid;
private UserService userService;
private UserinfoService userinfoService;


public void userDetail(){
	JSONObject sendjson  = new JSONObject();
	UserCase userCase = new UserCase(sendjson);
	HttpServletResponse response = ServletActionContext.getResponse();
	PrintWriter out = null;
	try {
		out = response.getWriter();
		userCase.userDetail(userid, userService, userinfoService, dealInfoService);
	} catch (Exception e) {
		userCase.sendjson.put("code", -1);
		e.printStackTrace();
	}
	out.print(sendjson);
}




public void setDealInfoService(DealInfoService dealInfoService) {
	this.dealInfoService = dealInfoService;
}




public void setUserid(int userid) {
	this.userid = userid;
}




public void setUserService(UserService userService) {
	this.userService = userService;
}




public void setUserinfoService(UserinfoService userinfoService) {
	this.userinfoService = userinfoService;
}



}
